<?php
/* @var $this AdminerController */
/* @var $model Adminer */
/* @var $form CActiveForm */
//一级行业分类,用于分类下拉菜单数据,分获取一级行业分类，如后续有需求可扩展至二级分类,
$cateData = Category::model()->loadTopList()
?>



<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'adminer-form',
	'enableAjaxValidation'=>true,
		
)); ?>
<?php echo $form->hiddenField($model,'zda_login')?>
<?php echo $form->hiddenField($model,'zda_ip')?>
<?php echo $form->hiddenField($model,'inputtime')?>
<?php echo $form->hiddenField($model,'updatetime')?>
<ul class="form_list form_list2">
	<li class="c_f"><span class="tit">&nbsp;</span>
		<?php echo $form->errorSummary($model); ?>
	</li>
	
	<li class="c_f"><span class="tit">管理员名称：</span>
		<div class="cont f_l">
			<?php echo $form->textField($model,'zda_username',array('class'=>'t_ipt ipt_bg w_250')); ?>
			<?php echo $form->error($model,'zda_username'); ?>
		</div>
	</li>
	
	<li class="c_f"><span class="tit">真实姓名：</span>
		<div class="cont f_l">
			<?php echo $form->textField($model,'zda_name',array('class'=>'t_ipt ipt_bg w_250')); ?>
			<?php echo $form->error($model,'zda_name'); ?>
		</div>
	</li>
	<?php if($model->isNewRecord){?>
	<li class="c_f"><span class="tit">管理员密码：</span>
		<div class="cont f_l">
			<?php echo $form->passwordField($model,'zda_password',array('class'=>'t_ipt ipt_bg w_250')); ?>
			<?php echo $form->error($model,'zda_password'); ?>
		</div>
	</li>
	<?php }?>
	<li class="c_f"><span class="tit">管理员角色：</span>
		<div class="cont f_l">
			<?php echo $form->dropDownList($model,'zag_id',AdmRole::model()->getRoleListData(),array('class'=>'s_ipt w_170')); ?>
			<?php echo $form->error($model,'zag_id'); ?>
		</div>
	</li>
	
	<li class="c_f"><span class="tit">行业分类：</span>
		<div class="cont f_l">
			<?php echo CHtml::dropDownList('Adminer[zca_ids][]',$model->zca_ids,$cateData,array('class'=>' w_170','empty'=>'选择全部','multiple'=>true,'size'=>5)); ?>
			<span class="c_666">按住 Ctrl 可实现多选</span>
			<?php echo $form->error($model,'zca_ids'); ?>
		</div>
	</li>
	
	<li class="c_f"><span class="tit">状态：</span>
		<div class="cont f_l">
			<?php echo $form->radioButtonList($model,'zda_status',Adminer::model()->getZdaStatus(),array('labelOptions'=>array('class'=>'mr20'),'separator'=>'')); ?>
			<?php echo $form->error($model,'zda_status'); ?>
		</div>
	</li>


	<li class="c_f"><span class="tit">&nbsp;</span>
		<div class="cont f_l">
			<?php echo CHtml::submitButton(Yii::t('adm','Save Date'),array('class'=>'mem_btn mem_btn20 mr5')); ?>
			<?php if(!$model->isNewRecord) echo CHtml::link('重置密码',array($this->pre_module_url.'/memSub/resetPassword','id'=>$model->zda_id),array('class'=>'mem_btn mem_btn07'))?>
		</div>
	</li>
<?php $this->endWidget(); ?>
